<?php

class Core_Form_Admin_Appearance_Section extends Form
{
	function init()
	{
		$this -> addChild('radio', 'section', array(
			'multiOptions' => array(
				'content' => 'content',
				'header' => 'header',
				'footer' => 'footer'
			),
			'rules' => 'required',
			'value' => 'content',
		));

		$this -> addChild('text', 'path', array('label' => 'Path'));

		$this -> addChild('text', 'theme', array(
			'label' => 'Theme',
			'rules' => 'required',
			'value' => 'default'
		));

		$this -> addChild('select', 'module', array(
			'label' => 'Module',
			'multiOptions' => Model::getTable('core.module') -> getMultiOptions(),
			'required' => true,
			'rules' => 'required',
			'value' => 'core',
		));

		$this -> addChild('text', 'sort_order', array(
			'label' => 'Sort Order',
			'required' => true,
			'rules' => 'required',
			'value' => 99,
		));

		$this -> addChild('yesno', 'is_active', array(
			'label' => 'Active',
			'required' => true,
			'rules' => 'required',
			'value' => 1,
		));

		$this -> addChild('yesno', 'is_locked', array(
			'label' => 'Lock',
			'required' => true,
			'rules' => 'required',
			'value' => 1,
		));

		$this -> addChild('yesno', 'is_custom', array(
			'label' => 'Custom',
			'required' => true,
			'rules' => 'required',
			'value' => 0,
		));

		$this -> addChild('group', '_buttons');
		$this -> _buttons -> addChild('submit', '_submit') -> addChild('cancel', '_cancel');
	}

}
